
(define (problem p17-net2-b16-g5)
  (:domain pipesworld_strips)

  (:objects
   B10 B14 B4 B6 B15 B13 B8 B2 B11 B5 B0 B1 B7 B9 B12 B3 - batch-atom
   A1 A2 A3 - area
   S12 S13 - pipe)

  (:init
   ;; speed of pipe segments
   (= (speed S12) 2)
   (= (speed S13) 2)
   ;; All pipelines segments are in normal state
   (normal S12)
   (normal S13)
   ;; Interfaces restrictions
   (may-interface lco lco)
   (may-interface gasoleo gasoleo)
   (may-interface rat-a rat-a)
   (may-interface oca1 oca1)
   (may-interface oc1b oc1b)
   (may-interface lco gasoleo)
   (may-interface gasoleo lco)
   (may-interface lco oca1)
   (may-interface oca1 lco)
   (may-interface lco oc1b)
   (may-interface oc1b lco)
   (may-interface lco rat-a)
   (may-interface rat-a lco)
   (may-interface gasoleo rat-a)
   (may-interface rat-a gasoleo)
   (may-interface gasoleo oca1)
   (may-interface oca1 gasoleo)
   (may-interface gasoleo oc1b)
   (may-interface oc1b gasoleo)
   (may-interface oca1 oc1b)
   (may-interface oc1b oca1)
   ;; Network topology definition
   (connect A1 A2 S12)
   (connect A1 A3 S13)
   ;; Batch-atoms products
   (is-product B10 oca1)
   (is-product B14 oca1)
   (is-product B4 rat-a)
   (is-product B6 lco)
   (is-product B15 gasoleo)
   (is-product B13 gasoleo)
   (is-product B8 oc1b)
   (is-product B2 lco)
   (is-product B11 lco)
   (is-product B5 oc1b)
   (is-product B0 oc1b)
   (is-product B1 rat-a)
   (is-product B7 oca1)
   (is-product B9 oca1)
   (is-product B12 rat-a)
   (is-product B3 oca1)
   ;; Batch-atoms initially located in areas
   (on B14 A2)
   (on B4 A2)
   (on B6 A1)
   (on B13 A2)
   (on B8 A2)
   (on B2 A3)
   (on B11 A3)
   (on B5 A3)
   (on B0 A1)
   (on B7 A2)
   (on B9 A3)
   (on B12 A2)
   ;; Batch-atoms initially located in pipes
   (first B1 S12)
   (follow B15 B1)
   (last B15 S12)
   (first B10 S13)
   (follow B3 B10)
   (last B3 S13)
   ;; Unitary pipeline segments
   (not-unitary S12)
   (not-unitary S13)
   )

  (:goal (and (on B10 A3)
	      (on B14 A1)
	      (on B15 A1)
	      (on B0 A2)
	      (on B1 A1)))

  (:constraints (and (preference d1 (within 3.1 (on b1 a1)))
		     (preference d2 (within 3.1 (on b14 a1)))
		     (preference d3 (within 3.1 (on b15 a1)))
		     (preference d4 (within 3.1 (on b14 a1)))
		     (preference d5 (within 2.55 (on b1 a1)))
		     (preference d6 (within 2.55 (on b10 a3)))
		     (preference d7 (within 2.55 (on b15 a1)))
		     (preference d8 (within 2.55 (on b10 a3)))
		     (preference d9 (within 4.1 (on b1 a1)))
		     (preference d10 (within 4.1 (on b0 a2)))
		     (preference d11 (within 6.7 (on b1 a1)))
		     (preference d12 (within 6.7 (on b10 a3)))
		     (preference d13 (within 6.7 (on b0 a2)))
		     (preference d14 (within 7.5 (on b1 a1)))
		     (preference d15 (within 7.5 (on b14 a1)))
		     (preference d16 (within 7.5 (on b10 a3)))
		     (preference d17 (within 7.5 (on b0 a2)))))

  (:metric maximize
   (+ (* 11.8 (- 1 (is-violated d1)))
      (+ (* 20.2 (- 1 (is-violated d2)))
	 (+ (* 12.3 (- 1 (is-violated d3)))
	    (+ (* 22.4 (- 1 (is-violated d4)))
	       (+ (* 7.4 (- 1 (is-violated d5)))
		  (+ (* 8.4 (- 1 (is-violated d6)))
		     (+ (* 11.5 (- 1 (is-violated d7)))
			(+ (* 13.6 (- 1 (is-violated d8)))
			   (+ (* 12.7 (- 1 (is-violated d9)))
			      (+ (* 32.4 (- 1 (is-violated d10)))
				 (+ (* 6.5 (- 1 (is-violated d11)))
				    (+ (* 8.5 (- 1 (is-violated d12)))
				       (+ (* 5.2 (- 1 (is-violated d13)))
					  (+ (* 7.8 (- 1 (is-violated d14)))
					     (+ (* 7.4 (- 1 (is-violated d15)))
						(+ (* 9.9 (- 1 (is-violated d16)))
						   (* 6.1 (- 1 (is-violated d17)))
						   )))))))))))))))))

  )
